package com.bw.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.ResourceBundle;

/***************************
 FileAction:

 CreateTime:2022-05-10 8:19
 Author:Aaking-aline
 ****************************/
public class JDBC {

    private static ResourceBundle rb = ResourceBundle.getBundle("database");
    private static String driver = rb.getString("driver");
    private static String url = rb.getString("url");
    private static String user = rb.getString("user");
    private static String pass = rb.getString("pass");

    static {
        try {
            Class.forName(driver);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }

    public static Connection getConnection() throws SQLException {
        return DriverManager.getConnection(url,user,pass);
    }
}













